(function($){"use strict";UNCODE.stickyTrigger=function($el){if(SiteParameters.is_frontend_editor)return!1;var stickyTrigger=function(){var stickyTrick=$(".sticky-trigger").each(function(){var $sticky=$(this),$inside=$("> div",$sticky),insideH=$inside.outerHeight(),$row=$sticky.closest(".vc_row"),$uncont=$sticky.closest(".uncont"),rowBottom,uncontBottom,diffBottom;ScrollTrigger.create({trigger:$sticky,start:function(){return"top center-="+insideH/2},endTrigger:$row,end:function(){return rowBottom=$row.offset().top+$row.outerHeight(),uncontBottom=$uncont.offset().top+$uncont.outerHeight(),diffBottom=rowBottom-uncontBottom,"bottom center+="+(insideH/2+diffBottom)},anticipatePin:!0,pin:!0,pinSpacing:!1,scrub:!0,invalidateOnRefresh:!0})})},setResizeSticky;$(window).on("load",function(){stickyTrigger();var carousel=document.querySelector(".owl-carousel"),grid=document.querySelector(".isotope-container"),stickyAll=document.querySelectorAll(".sticky-trigger");if(stickyAll.length)var sticky=stickyAll[stickyAll.length-1];if(typeof sticky!="undefined"){if(typeof carousel!="undefined"&&carousel!==null)var carousel_position=sticky.compareDocumentPosition(carousel);if(typeof grid!="undefined"&&grid!==null)var grid_position=sticky.compareDocumentPosition(grid);(carousel_position===2||grid_position===2)&&setTimeout(function(){$(document).trigger("uncode-scrolltrigger-refresh")},500)}});var oldW=UNCODE.wwidth;$(window).on("resize uncode.re-layout",function(e){clearRequestTimeout(setResizeSticky);if(e.type==="resize"&&oldW===UNCODE.wwidth)return;oldW=UNCODE.wwidth,setResizeSticky=requestTimeout(function(){stickyTrigger(),$(document).trigger("uncode-scrolltrigger-refresh")},1e3)})}})(jQuery)